package com.xiaoq.sites.repository;

import java.util.List;

import com.xiaoq.sites.entity.SitesRoutePointEntity;

public interface ISitesRoutePointRepository {
	
	public SitesRoutePointEntity findById(String id);
	
	/**
	 * 根据线路ID查询，该线路所经过的景点ID关联表
	 * @param sitesId
	 * @return
	 */
	public List<SitesRoutePointEntity> findSitesRoutePointByRouteId(String routeId);
	
	/**
	 * 根据景点ID，查询经过该景点的所有线路
	 * @param sitesId
	 * @return
	 */
	public List<SitesRoutePointEntity>  findSitesRoutePointBySitesPointId(String sitesPointId);
	
	/**
	 * 根据线路ID查询，该线路所经过的景点ID关联表
	 * @param routeIdList 根据线路ID List
	 * @return
	 */
	public List<SitesRoutePointEntity> findSitesRoutePointByRouteIdList(List<String> routeIdList);
	
	/**
	 * 路线Id删除景点和线路之间关系数据
	 * @param sitesId
	 * @param routeId
	 * @return
	 */
	public boolean deleteRoutePointByRouidPointId(String routeId);
	
	/**
	 * 在路线上添加一个景点
	 * @param sitesRoutePoint
	 * @return
	 */
	public boolean addRoutePoint(SitesRoutePointEntity sitesRoutePoint);
	
	public boolean delRoutePoint(String routeId,String sitesPointId);
	
	/**
	 * 
	 * 查询景点线路关系是否已经存在
	 * @param routeId
	 * @param sitesPointId
	 * @return
	 */
	public boolean findRoutePointByrouteIdAndPointId(String routeId,String sitesPointId);
	
	/**
	 * 根据景点id删除所有线路上的这个点
	 * @param pointId
	 * @return
	 */
	public boolean delPointRoute(String pointId);
	
	/**
	 * 移动线路上两个点的位置
	 * @param routeId
	 * @param pointId
	 * @param status
	 * @return
	 */
	public boolean changeRoutePoint(String routeId,Integer sortNum,Integer status);
	
	
	
}
